package com.itwn.entity;

import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

public class Role {
    private Integer roleId;

    private String roleCode;

    private String roleName;

    @DateTimeFormat(pattern = "yyyy:MM:dd mm:ss")
    private Date insertTime;

    @DateTimeFormat(pattern = "yyyy:MM:dd mm:ss")
    private Date updateTime;

    public Integer getRoleId() {
        return roleId;
    }

    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }

    public String getRoleCode() {
        return roleCode;
    }

    public void setRoleCode(String roleCode) {
        this.roleCode = roleCode;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    public Date getInsertTime() {
        return insertTime;
    }

    public void setInsertTime(Date insertTime) {
        this.insertTime = insertTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        return "Role{" +
                "roleId=" + roleId +
                ", roleCode='" + roleCode + '\'' +
                ", roleName='" + roleName + '\'' +
                ", insertTime=" + insertTime +
                ", updateTime=" + updateTime +
                '}';
    }

    public Role() {
    }

    public Role(Integer roleId, String roleCode, String roleName, Date insertTime, Date updateTime) {
        this.roleId = roleId;
        this.roleCode = roleCode;
        this.roleName = roleName;
        this.insertTime = insertTime;
        this.updateTime = updateTime;
    }
}